package work;

import java.util.Vector;

public class BaoziBox {
    Vector<Baozi> baozis = new Vector<>();
    int count = 0;
    boolean flag = false;

    public  void putBaozi(Baozi baozi) {
        this.baozis.add(baozi);
        //System.out.println(baozi.toString());
        count++;
    }

    public int getCount() {
        return count;
    }

    public  Baozi fetch() {
        count--;
       // System.out.println(this.baozis);
        if (baozis.size() != 0)
            return baozis.remove(0);
        return null;
    }
}
